package filter;

import javax.servlet.*;
import javax.servlet.annotation.WebFilter;
import java.io.IOException;
import java.util.logging.Filter;
import java.util.logging.LogRecord;

@WebFilter("/*")
public class FilterDemo02 implements Filter {
    public void destroy() {
    }

    public void doFilter(ServletRequest req, ServletResponse resp, FilterChain chain) throws ServletException, IOException {
        System.out.println("FilterDemo2出发了.....");

         //方形
        chain.doFilter(req, resp);
        System.out.println("FilterDemo2回来了");
    }

    public void init(FilterConfig config) throws ServletException {

    }

    @Override
    public boolean isLoggable(LogRecord logRecord) {
        return false;
    }
}
